<?php

namespace App\Models;


use Illuminate\Database\Eloquent\Model;

/**
 * Class UserAction - 用户活动 （统计记录可抽奖次数等）
 *
 * @package App\Models
 */
class UserAction extends Model
{
    protected $table = 'user_actions';

    protected static $unguarded = true;

    const TYPE_INVITE_REGISTER = 1;
    const TYPE_SHARE_TO_FACEBOOK = 2;
    const TYPE_JOIN_FACEBOOK_GROUP = 3;

    const ADD_LOTTERY_COUNT_TYPES = [
        self::TYPE_INVITE_REGISTER,
        self::TYPE_SHARE_TO_FACEBOOK,
        self::TYPE_JOIN_FACEBOOK_GROUP,
    ];

    protected $casts = [
        'user_id' => 'int',
        'type'    => 'int',
    ];
}
